package com.qf.weekexam.service;

import com.qf.weekexam.entity.User;
import com.qf.weekexam.ex.UserException;
import com.qf.weekexam.vo.HelperPageVo;
import com.qf.weekexam.vo.ResultVo;
import com.qf.weekexam.vo.TableVo;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;

public interface UserService {

    User login(String username, String password);

    TableVo<User> getUserByHelper(HelperPageVo helperPageVo);

    void addUser(User user) throws UserException;

    String export();

    void downFile(String filename, HttpServletResponse response) throws IOException;

    void delUsers(Integer[] ids);


    void updateUserById(User user) throws UserException;

    ResultVo uploadFile(MultipartFile multipartFile) throws IOException;

    ResultVo getUserPhoto(HttpSession session);

    void getUserImage(HttpSession session, HttpServletResponse response) throws IOException;
}
